From: Giovanni Campagna Date: Thu, 6 Feb 2014 17:10:21 +0000 (+0100) Subject: Fix regression after mutter commit 254afc50223a707c3afa7c9f638681199f41809e X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2829 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=61a58ff3c981d4e5f6f7f0dd4414eef5344561a9;p=gnome-shell.git Fix regression after mutter commit 254afc50223a707c3afa7c9f638681199f41809e The "old and unused API" was not so unused after all :) --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index aab6a7e36..1b24e59f5 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -804,22 +804,25 @@ const ThumbnailsBox = new Lang.Class({ [newWorkspaceIndex, this._dropPlaceholderPos] = [this._dropPlaceholderPos, -1]; // Nab all the windows below us. - let windows = global.get_window_actors().filter(function(win) { + let windows = global.get_window_actors().filter(function(winActor) { // If the window is attached to an ancestor, we don't need/want to move it - if (!!win.meta_window.get_transient_for()) + let window = winActor.meta_window; + + if (window.get_transient_for() != null) return false; if (isWindow) - return win.get_workspace() >= newWorkspaceIndex && win != source; + return window.get_workspace() >= newWorkspaceIndex && winActor != source; else - return win.get_workspace() >= newWorkspaceIndex; + return window.get_workspace() >= newWorkspaceIndex; }); this._spliceIndex = newWorkspaceIndex; // ... move them down one. - windows.forEach(function(win) { - win.meta_window.change_workspace_by_index(win.get_workspace() + 1, true); + windows.forEach(function(winActor) { + let window = winActor.meta_window; + window.change_workspace_by_index(window.get_workspace() + 1, true); }); if (isWindow)